import request from '@/utils/request'
//所属用户列表
export function userList(params) {
  return request({
    url: 'api/yxUser/list',
    method: 'get',
    params
  })
}
// 分配负责人
export function add(data) {
  return request({
    url: 'api/region/add',
    method: 'post',
    data
  })
}
// 重置负责人
export function reset(data) {
  return request({
    url: 'api/region/reset',
    method: 'post',
    data
  })
}

// 商铺详情
export function getInfo(id) {
  return request({
    url: 'api/nodeManager/nodeDetail/' + id,
    method: 'get'
  })
}
//审核
export function audit(data) {
  return request({
    url: 'api/nodeManager/audit',
    method: 'post',
    data
  })
}


















export function edit(data) {
  return request({
    url: 'api/yxStoreProduct',
    method: 'put',
    data
  })
}

export function updateShop(data) {
  return request({
    url: 'api/shStore/update',
    method: 'post',
    data
  })
}

export function shopGoods(data) {
  return request({
    url: 'api/shStore/list',
    method: 'post',
    data
  })
}
export function recovery(id) {
  return request({
    url: 'api/yxStoreProduct/recovery/' + id,
    method: 'delete'
  })
}

export function isFormatAttr(id, data) {
  return request({
    url: 'api/yxStoreProduct/isFormatAttr/' + id,
    method: 'post',
    data
  })
}

export function isFormatAttrForActivity(id, data) {
  return request({
    url: 'api/yxStoreProduct/isFormatAttrForActivity/' + id,
    method: 'post',
    data
  })
}
export function setAttr(id, data) {
  return request({
    url: 'api/yxStoreProduct/setAttr/' + id,
    method: 'post',
    data
  })
}

export function clearAttr(id) {
  return request({
    url: 'api/yxStoreProduct/clearAttr/' + id,
    method: 'post'
  })
}

export function getAttr(id) {
  return request({
    url: 'api/yxStoreProduct/attr/' + id,
    method: 'get'
  })
}
export function getArea(params) {
  return request({
    url: 'api/areaTree/getCityByCode',
    method: 'get',
    params
  })
}

export function getStoreCategoryList(params) {
  return request({
    url: 'api/getStoreCategoryList ',
    method: 'get',
    params
  })
}

export function getDistributableNodeLis(id) {
  return request({
    url: 'api/nodeManager/getDistributableNodeList/'+id,
    method: 'get',
  })
}


